Select newly added nodes on drag and drop in 2D viewport #84356
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements this proposal: godotengine/godot-proposals#8282 for 2D viewport.
Testing:
Create couple scenes of different types which can be added to a 2D scene and save them as separate. Try to drag and drop these directly in to the viewport (not the scene tree tab that's a different thing and works ok), one by one, multiple files, have some root node selected or not, do the same with images/icons in FileSystem.
What you should see with this change is that the newly added node(s) will be selected immediately so you should be able to work with them in the viewport.
Test with Undo/Redo too please.
Known issues:
When undoing the orange selection borders remain on the screen until you release the undo shortcut or press for example a mouse button. So far it doesn't seem to be a functional issue as far as I can tell. I don't know what to do about it, I'm open to opinions and suggestions.
Related 3D PR: #84347